The following patch is a major restructuring of main.py to be more straight forward...
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 9 Aug 2005 12:50:22 +0000 (12:50 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 9 Aug 2005 12:50:22 +0000 (12:50 +0000)
commitb9a5e01c1974573a6a996dda89eaf266ce38629d
treef20492367b1f730c284483c064cda1a6f3964965
parent1b63dcf8f47d640c175b99c03b47bba3498dd089
The following patch is a major restructuring of main.py to be more straight forward, and remove as much code as possible.
It does a number of things:

* It implements the standardized options proposed via my RFC for xm
* It restructures the calling of these functions to be function pointers out
  of a dictionary, instead of subclasses found through inspection
* It consolidates all help info, making it easier to see that the help
  screen looks consistent across commands.  (Per command help isn't yet in
  this patch just global help)
* It moves object importing into the functions that require them only,
  allowing commands like "xm help" to be runable as non root
* It adds command aliasing to provide backwards compatibility with many
  commands (i.e. xm balloon)
* It provides more useful error messages is most fail cases
* It implements a short help by default (which takes < 24 screen lines) as
  requested by Mark W at OLS
* It attempts to trap more exceptions than before and provide useful errors
  based on them (this requires more testing)

This patch makes no changes to any other elements of xen/xm, and works with
all other objects and libraries as is.

Signed-off-by: Sean Dague <sean@dague.net>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xm/main.py